<template>
  <div>
    this is child1<br />
    {{ string }}
    <button @click="getParent($parent)">获取父组件</button>
  </div>
</template>

<script setup lang="ts">
  import { ref } from 'vue'

  let string = ref('hello world')
  defineExpose({ string })
  const getParent = (parent: any) => {
    console.log('parent--', parent.home)
  }
</script>

<style>
</style>